package cn.itcast.io.a.file.filefilter;

import java.io.File;
import java.io.FileFilter;

public class FileFilterBySuffix implements FileFilter {
    private String suffix;

    public FileFilterBySuffix(String suffix) {
        this.suffix = suffix;
    }

    @Override
    public boolean accept(File pathname) {
        return pathname.getName().endsWith(suffix);
    }
}
